home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
class
/
intary.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-04-16
|
8KB
|
320 lines
/* Copyright (c) 1993-1996 Algorithms Corporation */
/* All rights reserved. */
/* This file automatically generated by dpp - do not edit */
#define DPP_STRATEGY 2
#define DPP_FASTWIDE 0
#line 18 "intary.d"
#include "array1.h"
#define CLASS IntegerArray_c
#define ivType IntegerArray_iv_t
#include "generics.h"
object IntegerArray_c;
#line 26 "intary.d"
#define TYPE int
static gIndex_t _index;
cvmeth objrtn IntegerArray_cvm_vNew(object self, va_list _rest_)
{
unsigned rank = va_arg(_rest_, unsigned);
#line 34 "intary.d"
static gNewArray_t cnew = NULL;
MAKE_REST(rank);
if (!cnew)
cnew = cmcPointer(Array, gNewArray);
return cnew(self, AT_INT, rank, _rest_);
}
#line 48 "intary.c"
static objrtn IntegerArray_cfm_vNew(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_cvm_vNew(self, _rest_);
}
#line 42 "intary.d"
ivmeth char IntegerArray_ivm_vCharValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (char) *((TYPE *) _index(self, _rest_));
}
#line 66 "intary.c"
static char IntegerArray_ifm_vCharValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vCharValue(self, _rest_);
}
#line 48 "intary.d"
ivmeth short IntegerArray_ivm_vShortValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (short) *((TYPE *) _index(self, _rest_));
}
#line 84 "intary.c"
static short IntegerArray_ifm_vShortValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vShortValue(self, _rest_);
}
#line 54 "intary.d"
ivmeth unsigned short IntegerArray_ivm_vUnsignedShortValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (unsigned short) *((TYPE *) _index(self, _rest_));
}
#line 102 "intary.c"
static unsigned short IntegerArray_ifm_vUnsignedShortValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vUnsignedShortValue(self, _rest_);
}
#line 60 "intary.d"
ivmeth long IntegerArray_ivm_vLongValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (long) *((TYPE *) _index(self, _rest_));
}
#line 120 "intary.c"
static long IntegerArray_ifm_vLongValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vLongValue(self, _rest_);
}
#line 66 "intary.d"
ivmeth double IntegerArray_ivm_vDoubleValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (double) *((TYPE *) _index(self, _rest_));
}
#line 138 "intary.c"
static double IntegerArray_ifm_vDoubleValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vDoubleValue(self, _rest_);
}
#line 72 "intary.d"
ivmeth objrtn IntegerArray_ivm_vChangeValue(object self, va_list _rest_)
{ object val = va_arg(_rest_, object);
MAKE_REST(val);
ChkArg(val, 2);
*((TYPE *) _index(self, _rest_)) = (TYPE) gLongValue(val);
return self;
}
#line 158 "intary.c"
static objrtn IntegerArray_ifm_vChangeValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vChangeValue(self, _rest_);
}
#line 80 "intary.d"
ivmeth objrtn IntegerArray_ivm_vChangeCharValue(object self, va_list _rest_)
{ int val = va_arg(_rest_, int);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 177 "intary.c"
static objrtn IntegerArray_ifm_vChangeCharValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vChangeCharValue(self, _rest_);
}
#line 87 "intary.d"
ivmeth objrtn IntegerArray_ivm_vChangeShortValue(object self, va_list _rest_)
{ int val = va_arg(_rest_, int);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 196 "intary.c"
static objrtn IntegerArray_ifm_vChangeShortValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vChangeShortValue(self, _rest_);
}
#line 94 "intary.d"
ivmeth objrtn IntegerArray_ivm_vChangeUShortValue(object self, va_list _rest_)
{ unsigned val = va_arg(_rest_, unsigned);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 215 "intary.c"
static objrtn IntegerArray_ifm_vChangeUShortValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vChangeUShortValue(self, _rest_);
}
#line 101 "intary.d"
ivmeth objrtn IntegerArray_ivm_vChangeLongValue(object self, va_list _rest_)
{ long val = va_arg(_rest_, long);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 234 "intary.c"
static objrtn IntegerArray_ifm_vChangeLongValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vChangeLongValue(self, _rest_);
}
#line 108 "intary.d"
ivmeth objrtn IntegerArray_ivm_vChangeDoubleValue(object self, va_list _rest_)
{ double val = va_arg(_rest_, double);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 253 "intary.c"
static objrtn IntegerArray_ifm_vChangeDoubleValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return IntegerArray_ivm_vChangeDoubleValue(self, _rest_);
}
#line 115 "intary.d"
static void init_class(void)
{
_index = imcPointer(Array, gIndex);
}
#line 269 "intary.c"
objrtn IntegerArray_initialize(void)
{
static CRITICALSECTION cs;
static int volatile once = 0;
ENTERCRITICALSECTION(_CI_CS_);
if (!once) {
INITIALIZECRITICALSECTION(cs);
once = 1;
}
LEAVECRITICALSECTION(_CI_CS_);
ENTERCRITICALSECTION(cs);
if (IntegerArray_c) {
LEAVECRITICALSECTION(cs);
return IntegerArray_c;
}
INHIBIT_THREADER;
NumberArray_initialize();
if (IntegerArray_c) {
ENABLE_THREADER;
LEAVECRITICALSECTION(cs);
return IntegerArray_c;
}
IntegerArray_c = gNewClass(Class, "IntegerArray", 0, 0, NumberArray, END);
cvMethodFor(IntegerArray, vNew, IntegerArray_cvm_vNew, IntegerArray_cfm_vNew);
ivMethodFor(IntegerArray, vCharValue, IntegerArray_ivm_vCharValue, IntegerArray_ifm_vCharValue);
ivMethodFor(IntegerArray, vChangeUShortValue, IntegerArray_ivm_vChangeUShortValue, IntegerArray_ifm_vChangeUShortValue);
ivMethodFor(IntegerArray, vChangeValue, IntegerArray_ivm_vChangeValue, IntegerArray_ifm_vChangeValue);
ivMethodFor(IntegerArray, vLongValue, IntegerArray_ivm_vLongValue, IntegerArray_ifm_vLongValue);
ivMethodFor(IntegerArray, vChangeCharValue, IntegerArray_ivm_vChangeCharValue, IntegerArray_ifm_vChangeCharValue);
ivMethodFor(IntegerArray, vUnsignedShortValue, IntegerArray_ivm_vUnsignedShortValue, IntegerArray_ifm_vUnsignedShortValue);
ivMethodFor(IntegerArray, vChangeDoubleValue, IntegerArray_ivm_vChangeDoubleValue, IntegerArray_ifm_vChangeDoubleValue);
ivMethodFor(IntegerArray, vDoubleValue, IntegerArray_ivm_vDoubleValue, IntegerArray_ifm_vDoubleValue);
ivMethodFor(IntegerArray, vChangeShortValue, IntegerArray_ivm_vChangeShortValue, IntegerArray_ifm_vChangeShortValue);
ivMethodFor(IntegerArray, vChangeLongValue, IntegerArray_ivm_vChangeLongValue, IntegerArray_ifm_vChangeLongValue);
ivMethodFor(IntegerArray, vShortValue, IntegerArray_ivm_vShortValue, IntegerArray_ifm_vShortValue);
init_class();
ENABLE_THREADER;
LEAVECRITICALSECTION(cs);
return IntegerArray_c;
}